export const isComment = (node) => {
    var _a, _b, _c, _d;
    return node.type === 'mdxFlowExpression' &&
        ((_b = (_a = node.data) === null || _a === void 0 ? void 0 : _a.estree) === null || _b === void 0 ? void 0 : _b.body.length) === 0 &&
        ((_d = (_c = node.data.estree.comments) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0;
};
export const isMdxJsEsm = (node) => node.type === 'mdxjsEsm';
export const estreeIsProgram = (node) => { var _a; return ((_a = node.data) === null || _a === void 0 ? void 0 : _a.estree) != null; };
export const isImportDeclaration = (bodyChild) => bodyChild.type === 'ImportDeclaration';
export const isExport = (type) => [
    'ExportAllDeclaration',
    'ExportDefaultDeclaration',
    'ExportNamedDeclaration', // export { ... } from "source"
].includes(type);
export const isExportNode = (bodyChild) => isExport(bodyChild.type);
export const isMdxJsxFlowElement = (node) => node.type === 'mdxJsxFlowElement';
export const createUniqueVariableName = (variableName, id) => `${variableName}_${id}`;
